import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm'

import { AddressModule } from './module/address.module';
import { AnnounceModule } from './module/announce.module';
import { InformationModule } from './module/information';
import { Address } from './entity/address.entity';
import { Announce } from './entity/announce.entity';
import { Information } from './entity/information.entity';
import { Activity } from './entity/activity';
import { ActivityModule } from './module/acitivity';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'coco',
      port: 3306,
      username: 'root', 
      password: 'r1A94B9K',
      database: 'scholarly_campus',
      entities: [
        Address,
        Announce,
        Information,
        Activity,
      ],
    }),
    AddressModule,
    AnnounceModule,
    InformationModule,
    ActivityModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule { }
